home *** CD-ROM | disk | FTP | other *** search
-
- docmd/docmd docmd/docmd
-
- DOCMD.DOC
-
- TIMED COMMAND EXECUTION
-
- Tobias Ferber
- Goethestraße 32
- 76135 Karlsruhe
- Deutschland
-
- ukjg@ibm3090.rz.uni-karlsruhe.de
-
-
- DOCMD [command] [options]
-
- DOCMD is a utility for timed execution of a command. I wrote it mainly
- to update the datestamp of a file in my s: directory regularly because
- my good old A1000 has no 'battery backed up clock'.
- The datestamp of this file can be copied to the system clock using the
- GetDate command coming with this distribution of DOCMD. You may of
- course use DOCMD to execute any command you like.
-
- DOCMD is in the PUBLIC DOMAIN. I claim no copyright at all. That means
- you can do with it whatever you want -- you may even sell it (if you can
- find anyone who would like to pay for it :)
- However donations in any form are not rejected -- preferably post
- cards with a photo of YOUr home-town and the name of the program
- i.e. DOCMD in this case.
-
- OPTIONS
-
- DOCMD supports both AmigaDOS and UNIX style options (with a leading
- minus sign '-'). Options may occur anywhere on the command line but
- they *MUST* occur singly. I.e. -a -b instead of -ab. Options
- requiring an additional numeric value or string may occur with or
- without an intervening space. -n17 and -n 17 are both legal. Last
- applies to the UNIX style options only; AmigaDOS keywords MUST be
- seperated with one or more spaces from their value. The usage of an
- equals sign '=' instead of a space character is legal for icon
- ToolTypes only . All options must of course be seperated with one
- or more spaces.
-
- DOCMD options are NOT case-sensitive except for the ToolTypes entries
- which are due to the FindToolType() function in the icon.library.
- This may change in future revisions of this library. ToolType keywords
- are the same as the AmigaDOS keywords. The SHOW keyword is not allowed
- as a ToolType.
-
- Here is a short overview of legal options:
-
- CMD/K,NOW/S,EVERY/N,COUNT/N,PRIORITY/N,WBSCREEN/T,QUIT/S:
-
- CMD or '-c' force next argument to be the command
- NOW or '-f' don't wait before first execution
- EVERY or '-t' execute command every <n> seconds
- COUNT or '-n' break after <n> executions
- PRIORITY or '-p' set task priority for the executed command
- WBSCREEN or '-w' show Workbench Screen during execution
- QUIT or '-q' remove DOCMD handler
-
- You can get this list by simply starting DOCMD with a '?' as argument.
- The trailing /K /N /S ot /T in AmigaDOS options must not be typed in
- the command-line. They only indicate the type of argument. e.g. /N
- indicates the need of a [N]umerical argument to a keyword.
-
- -c <cmd> forces the next argument to be the timed command.
- This command will be executed by DOCMD every <n> seconds
- if <n> is the number you specified with the -t option.
- You do not need to type '-c' if your command differs from
- all option names.
-
- Note: You'll have to quote this command if there are
- space characters in it as in "date >s:datestamp".
-
- -t <secs> set the number of seconds of delay between two executions
- of the command you gave using the '-c' option. DOCMD will
- also wait <secs> seconds before executing your command for
- the first time if you do not say "NOW" or '-f' in the
- command-line. You also have to pass "NOW" or '-f' if you
- want the new delay time to come into effect immediately.
- Otherwise it will change after the previously set delaytime
- runs out.
-
- Note: If you set <secs> to 0 you'll get the default of 60
- seconds. You don't need DOCMD to execute sth. without a
- delay.
-
- -f foce execution now. This option allows you to force the
- immediate execution of a command by the handler. If you
- pass this option when installing a new handler it will not
- wait <secs> seconds until your command is executed for
- the first time. If you send a '-f' to a waiting handler
- it will execute the command immediately.
-
- -n <count> set the number of executions before the handler will be
- removed. This is useful it you want to wait until a
- command is executed <count> times.
-
- -p <pri> set task priority to execute your command. (default 0)
-
- -w force the Workbench Screen to be in front each time
- the command is executed.
-
- -q remove a DOCMD handler.
-
- That's all. Have fun
-
- -Tobi
-